package cn.tedu.di;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Student {
    String sname ="黄毛仔";

    @Autowired //完成对象间的依赖关系spring di
    Teacher teacher;
//    public Teacher teacher =new Teacher();


    @Override
    public String toString() {
        return "Student{" +
                "sname='" + sname + '\'' +
                ", teacher=' " + teacher +
                '}';
    }
}
